# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Adrià Arrufat (archdria) <adria dot arrufat at protonmail ldot ch>

pkgname=libhttpseverywhere
pkgver=0.8.2
pkgrel=1
pkgdesc="Leverage the power of HTTPS Everywhere"
url="https://git.gnome.org/browse/libhttpseverywhere"
arch=(x86_64)
license=(LGPL3)
depends=(libgee libxml2 libarchive libsoup glib2 json-glib)
makedepends=(meson vala gobject-introspection git)
_commit=905a79559ee01aa2c3d591cba6982cb5cf811216  # tags/0.8.2^0
source=("git+https://git.gnome.org/browse/libhttpseverywhere#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -Denable_valadoc=true
  ninja -C build
}

check() {
  cd build
  meson test
}

package() {
  DESTDIR="$pkgdir" ninja -C build install
}
